<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="telephone=no" name="format-detection"/>
    <meta charset="UTF-8">
    <title>爱电影,爱生活(ady01.com),电影资源库.</title>
    <!-- head 中 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
    <!-- body 最后 -->
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>
    <!-- 如果使用了某些拓展插件还需要额外的JS -->
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/swiper.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/city-picker.min.js"></script>
    <style type="text/css">
        html, body {
            margin: 0px;
            margin: 0px;
        }

        body {
            font: 14px/1.5 tahoma, arial, "\5b8b\4f53";
            background-color: beige;
        }
        #list {
            padding: 10px;
        }

        .film-item {
            word-break: break-all; /* 支持IE和chrome，FF不支持*/
            word-wrap: break-word; /* 以上三个浏览器均支持 */
            margin: 10px 0px;
            margin-bottom: 15px;
            list-style: none;
        }
        .film-item .film-ext li {
            color: #666;
            font-size: 14px;
            font-weight: normal;
        }

        .film-item .film-title {
            font-size: 16px;
            font-weight: bold
        }
        .search-result-item{
            background-color: #EC8B89;
            color: white;
        }
    </style>
</head>
<body ontouchstart>
<div id="head-tip"
     style="position: fixed; top: 0px;left: 0px; width: 100%; color: #FFF; font-weight: bold; text-align: center; line-height: 30px; font-size:16px; background-color: #710909">
    观影提示：浏览器打开当前网站->下载迅雷客户端(手机或者PC)->点击相关电影标题
</div>

<ol id="list" class=\"film-item\">

</ol>
</body>
<script>
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }
    function getFilmItemHtml(filmModel) {
        if(!filmModel){
            return "";
        }
        var headerTitle = "";
        if(!filmModel.list){
            var title = filmModel.title;
            headerTitle = title;
            var thunder = filmModel.extMap.thunder;
            var flashget = filmModel.extMap.flashget;
            var qqdl = filmModel.extMap.qqdl;
            var s =
                "<li class='film-item'>" +
                "        <div class=\"film-title\"><a target=\"_blank\" href=\"" + thunder + "\">" + title + "</a></div>" +
                "        <ul class=\"film-ext\" style=\"/*margin-left:20px;*/ list-style: none\">" +
                "            </li><li>&nbsp;</li><li>迅雷链接:<br><a target=\"_blank\" href=\"" + thunder + "\">" + thunder + "</a>" +
                "            </li><li>快车链接:<br><a target=\"_blank\" href=\"" + flashget + "\">" + flashget + "</a>" +
                "            </li><li>qq旋风:<br><a target=\"_blank\" href=\"" + qqdl + "\">" + qqdl + "</a></li>" +
                "        </ul>" +
                "</li>";
            $("title").html(headerTitle);
            return s;
        }else {
            var title = filmModel.title;
            headerTitle = title;
            var s =
                "<li class='film-item'>" +
                "        <div class=\"film-title\">" + title + "</div><br>" +
                "        <ul class=\"film-ext\" style=\"/*margin-left:20px;*/ list-style: none\">";
            var list = filmModel.list;
            var listLen = list.length;
            for (var i = 0; i < listLen; i++) {
                var fm = list[i];
                var thunder = fm.extMap.thunder;
                var flashget = fm.extMap.flashget;
                var qqdl = fm.extMap.qqdl;
                s += "            <li>&nbsp;</li><li>" + fm.title + ":<br><a target=\"_blank\" href=\"" + thunder + "\">" + thunder + "</a></li>";
            }
            s += "        </ul>" +
                "</li>";
            $("title").html(headerTitle);
            return s;
        }
    }
    $(function () {
        $("#list").css({"margin-top": $("#head-tip").height() + 5});
        var film_id = getQueryString("id");
        $.ajax({
            url: "film/detail/" + film_id + ".json", success: function (data) {
                for (var a in data) {
                    var filmModel = data[a];
                    $("#list").append(getFilmItemHtml(filmModel));
                }
                loading = false;
                $("#weui-loadmore").hide();
            }
        });

    });
</script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?886377726f604e4e3e3a4ef099c24100";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<a href="/" style="text-underline: none; position: fixed; width: 60px; height: 60px; font-weight: bold; line-height: 60px; bottom: 50px; right: 20px; text-align: center; background-color: #710909; border-radius: 50%; color: white;">
    返回
</a>
<div style=" line-height: 50px; text-align: center">
    备案号：
    <a target="_blank" href="http://www.miitbeian.gov.cn">沪ICP备12033211号</a>
</div>
</html>